Skip to main content
Glama

get analytics root content published

Retrieve daily post publication counts from TabNews to analyze content trends and publishing patterns.

Instructions

To get how many posts were made (per day) in tabnews

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool definition including the handler function that executes the tool logic: fetches analytics data from service, formats as JSON text in McpResponse, and handles errors.
    export const getAnalyticsRootContentPublishedTool = { name: "get analytics root content published", description: "To get how many posts were made (per day) in tabnews", parameters: {}, handler: async (): Promise<McpResponse> => { try { const result = await getAnalyticsRootContentPublished(); const content: McpTextContent = { type: "text", text: `Analytics Root Content Published:\n\n${JSON.stringify( result, null, 2 )}`, }; return { content: [content], }; } catch (error) { if (error instanceof Error) { throw new Error( `Failed to get analytics root content published: ${error.message}` ); } else { throw new Error("Failed to get analytics root content published"); } } }, };
  • TypeScript interface defining the structure of the analytics root content published data (output schema).
    export interface AnalyticsRootContentPublished { date: string; conteudos: number; }
  • src/index.ts:66-71 (registration)
    Registration of the tool in the MCP server using server.tool().
    server.tool( getAnalyticsRootContentPublishedTool.name, getAnalyticsRootContentPublishedTool.description, getAnalyticsRootContentPublishedTool.parameters, getAnalyticsRootContentPublishedTool.handler );
  • Helper function that performs the actual API fetch to retrieve the analytics root content published data from TabNews.
    export async function getAnalyticsRootContentPublished(): Promise< AnalyticsRootContentPublished[] > { const response = await fetch( `${TABNEWS_API_URL}/analytics/root-content-published` ); const data = await response.json(); return data as AnalyticsRootContentPublished[]; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/renant/mcp-tabnews'

If you have feedback or need assistance with the MCP directory API, please join our Discord server